import "pkl:test"

class Person {
  address: Address(street.endsWith("St."))
}

class Address {
  street: String
}

res1 = new Person {
  address {
    street = "Hampton St."
  }
}

res2 = test.catch(() ->
  new Person {
    address {
      street = "Garlic Blvd."
    }
  }.address
)
